package cn.base.day07;
public class Teacher {
    private String name;
    private int code;

    public Teacher() {
    }

    public Teacher(String name, int code) {
        this.name = name;
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public void teach() {
        System.out.println("工号为" + code + "的" + name + "老师正在讲课");
    }
}
